Event on conbobox selection

Is it possible to to trigger execution of a function on combobox selection? If yes, please provide an example.


Anta_st - Fri Mar 04 10:52:42 EST 2016

Re: Event on conbobox selection
PekkaMakinen - Mon Mar 07 03:12:07 EST 2016

DOORS DXL has a combobox like drop-down list called "choice". For this you can set a function which fires when the selection changes:

DB reqBox = create "Edit Requirement"
string importance[] = {"Vital", "Useful",
                         "Convenient", "Useless"}
DBE reqImport = choice(reqBox, "Importance: ",
                 importance, 2)
void ShowVal(DBE option)
{
    int i = get reqImport
 
    ack(reqBox, "You selected " importance[i] "")
}  

void accept(DB reqBox)
{
    int i = get reqImport
    print importance[i]
}

ok(reqBox, "Accept", accept)

set(reqImport, ShowVal)

show reqBox

 

 

Re: Event on conbobox selection
Anta_st - Mon Mar 07 04:42:44 EST 2016

PekkaMakinen - Mon Mar 07 03:12:07 EST 2016

DOORS DXL has a combobox like drop-down list called "choice". For this you can set a function which fires when the selection changes:

DB reqBox = create "Edit Requirement"
string importance[] = {"Vital", "Useful",
                         "Convenient", "Useless"}
DBE reqImport = choice(reqBox, "Importance: ",
                 importance, 2)
void ShowVal(DBE option)
{
    int i = get reqImport
 
    ack(reqBox, "You selected " importance[i] "")
}  

void accept(DB reqBox)
{
    int i = get reqImport
    print importance[i]
}

ok(reqBox, "Accept", accept)

set(reqImport, ShowVal)

show reqBox

 

 

Great :), exactly what I was searching for! Thank you!